<template>
    <div>
        <h1>user</h1>
        <el-row>
            <el-table :data="User" height="600"
                      id="User"
                      border stripe
                      highlight-current-row
                      style="width: 70%"
                      size="mini"
                      v-loading="userTableLoading">
                <el-table-column prop="id" label="编号" align="center" :show-overflow-tooltip="true"
                                 sortable></el-table-column>
                <el-table-column prop="username" label="姓名" align="center" :show-overflow-tooltip="true"
                                 sortable></el-table-column>
                <el-table-column prop="realname" label="真实姓名" align="center" :show-overflow-tooltip="true"
                                 sortable></el-table-column>
                <el-table-column prop="sex" label="性别" align="center" :show-overflow-tooltip="true"
                                 sortable></el-table-column>
                <el-table-column prop="address" label="住址" align="center" :show-overflow-tooltip="true"
                                 sortable></el-table-column>
                <el-table-column prop="telephone" label="联系方式" align="center" :show-overflow-tooltip="true"
                                 sortable></el-table-column>
                <el-table-column prop="email" label="邮件" align="center" :show-overflow-tooltip="true"
                                 sortable></el-table-column>
                <el-table-column prop="country" label="国家" align="center" :show-overflow-tooltip="true"
                                 sortable></el-table-column>
            </el-table>
        </el-row>
    </div>
</template>

<script>
    import {postRequest} from "../utils/api";

    export default {
        name: "xin",
        data() {
            return {
                msg: "user",
                User: [],
                userTableLoading: false,

            }

        },
        methods: {},
        created() {
            const self = this;
            // 初始化加载显示所有用户信息。
            postRequest('/user/findAll', {}).then(res => {
                this.User = res.retList;
            })
            /* axios.get("/user/findAll").then(res => {
                self.User = res.data.retList;
                });*/

        },
    }
</script>

<style scoped>

</style>
